#ifndef __LEVELSELECT_SCREEN_H__
#define __LEVELSELECT_SCREEN_H__

#include "cocos2d.h"
#include "BaseScreen.h"

class LevelLoader;
class Level;

class LevelSelectScreen : public BaseScreen
{
private:
	//================= Reference =====================
	int							_levelSelected;
	int							_lockFactor;
	LevelLoader					*myLevelLoader;
	Level						**levelList;

	//================Screen flow function=============
	void						returnToPreviousScreen();

	//=================Buttons functions=============
    void						keyBackClicked(); //For back key button
    void						backButtonPressed();
    void						playButtonPressed();

    //=================Display Variables==============
    cocos2d::CCArray*			_levelButtons;

public:
	LevelSelectScreen();
	~LevelSelectScreen();
    CREATE_FUNC(LevelSelectScreen);

    virtual void 				ccTouchesBegan(cocos2d::CCSet* touches, cocos2d::CCEvent* event);

    static BaseScreen* 			createLayer();
    void 						loadScreen(FlowController *flowcontroller);

    void						setLevelLoaderReference(LevelLoader *levelloader) { myLevelLoader = levelloader; }
};

#endif // __LEVELSELECT_SCREEN_H__
